const router=require('koa-router')();
const checkLogin=require('../middlewares/checkLogin');

router.get('/',checkLogin(),async ctx=>{
    delete ctx.session.loginUser;
    ctx.flash={success:'登出成功'};
    await ctx.redirect('/');
});

module.exports=router;